# -*- coding: utf-8 -*-

###########################################################
#                                                         #
# shooter - shooter game                                  #
#                                                         #
# 2011 - Andreas Grätz                                    #
#                                                         #
# andreaszdw@googlemail.com                               #
#                                                         #
# planetsystem.py                                         #
#                                                         #
###########################################################

from PySFML import sf
import random

class PlanetSystem():
	def __init__(self):
		self.number_stars4x4 = 10
		self.number_stars1x1 = 10
		
		self.image_star1 = sf.Image()
		self.image_star1.LoadFromFile("../gfx/star_4x4.png")
		
		self.list_stars4x4 = []
		
		for i in range(self.number_stars4x4):
			self.list_stars4x4.append(sf.Sprite(self.image_star1))
			self.list_stars4x4[i].SetPosition(random.randint(0, 1023), random.randint(0, 767))
			self.list_stars4x4[i].SetCenter(self.image_star1.GetWidth()/2, self.image_star1.GetHeight()/2)
		
		self.image_star2 = sf.Image()
		self.image_star2.LoadFromFile("../gfx/star_1x1.png")
		
		self.list_stars1x1 = []
		
		for i in range(self.number_stars1x1):
			self.list_stars1x1.append(sf.Sprite(self.image_star2))
			self.list_stars1x1[i].SetPosition(random.randint(0, 1023), random.randint(0, 767))
			self.list_stars1x1[i].SetCenter(self.image_star2.GetWidth()/2, self.image_star2.GetHeight()/2)
						
	def load(self):
		pass
	
	def draw(self, window):
		for i in range(self.number_stars4x4):
			window.Draw(self.list_stars4x4)
			
		for i in range(self.number_stars1x1):
			window.Draw(self.list_stars1x1)
		
	def setviewcoord(self):
		pass
